<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="js/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <template v-if="flag === 1">
            <div>aaaaa</div>
            <div>bbbbbbbb</div>
            <div>ccccccccccccccc</div>
        </template>    
    </div>
    第一种写法
    <div id="app">
        <div v-if="flag === 1">
            <div>aaaaa</div>
            <div>bbbbbbbb</div>
            <div>ccccccccccccccc</div>
        </div>    
    </div>
    第二种写法
    <div id="app">
        <div>
            <div v-if="flag === 1">aaaaa</div>
            <div v-if="flag === 1">bbbbbbbb</div>
            <div v-if="flag === 1">ccccccccccccccc</div>
        </div>    
    </div>
    第三种写法
    <script>
        var vm = new Vue({
            el:"#app",
            data: {
                flag:1
            }
        });
    </script>
</body>
</html>